
<div class='left'>
    <div class="wrap-page">
	<div class="title-page"><strong>Friends</strong></div>   
	<?php $this->renderPartial('_menu'); ?>
	<div class="content-page">
	    <?php
	    $this->widget('bootstrap.widgets.TbGridView', array(
		'id' => 'post-grid',
		'dataProvider' => $model->searchMember(user()->id, $search),
		'filter' => $model,
		'columns' => array(
		    array(
			'header' => 'Avatar',
			'type' => 'raw',
			'value' => function($data) {
			    return '<img src="' . $data->getAvatarUrl('small') . '"/>';
			}
		    ),
		    array(
			'header' => 'Username',
			'name' => 'username',
			'type' => 'raw',
			'value' => function($data) {
			    return $data->getDisplayName();
			}
		    ),
		    array(
			'type' => 'raw',
			'value' => function($data) {
			    if (user()->id && user()->getModel()->status == User::STATUS_ACTIVE) {
				return $data->checkFriend(user()->id, $data->user_id, $data->username);
			    }
			}
		    )
		),
	    ));
	    ?>
	</div>
    </div>
</div>
<div class="right">
    <div class="box-right">
	<?php $this->widget('application.widgets.loginbox.LoginBox'); ?>

    </div><!--box-right-->
    <?php $this->widget('application.widgets.ad.Ad') ?>
</div><!--right-->